import { ref, watch, Ref } from 'vue'

const useRender = (isOpened: Ref<boolean>) => {
  const loading = ref(!isOpened.value)
  const visible = ref(true)

  watch(isOpened, (value) => {
    if (value) {
      loading.value = false
    }
  })
  return {
    loading,
    visible,
  }
}

export default useRender
